package com.wcm.system.code;

/**
 * 引擎规范：错误的处理原则，为记录日志，允许关机整改。
 *          警告的处理原则，为记录日志，提示管理用户,等待干预操作
 *          操作的处理原则为，程序必须处理
 */
public enum SystemCode {
    //TODO 错误
    SYSTEM_ERROR(10000,"未知错误类型"),
    CONFIG_ERROR(10001,"配置错误"),
    NOT_FOUND_DATA_PLUGIN_ERROR(14000,"没有数据驱动插件错误"),
    NOT_FOUND_PLUGIN_ERROR(14001,"找不到注册的插件"),
    NOT_FOUND_PLUGIN_METHOD_ERROR(14002,"找不到插件的注册方法"),
    //TODO 警告
    SYSCONNECTWARNING(20000,"系统级组件连接异常警告"),
    OUTERSYSCONNECTWARNING(20001,"外部系统级组件连接异常警告"),
    NO_PERMISSION_WARNING(20002,"没有权限连接系统"),
    //TODO 操作
    FASLEOPERATE(30000,"失败操作"),
    SUCCESSOPERATE(30001,"成功操作"),
    ;
     String msg;
     int code ;
    SystemCode(int code,String msg){
        this.msg = msg;
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
